<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Edit</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>Edit</h1>

<p>Opens the current script for editing in the associated editor.</p>

<pre class="Syntax">Edit</pre>
<p>The Edit command opens the current script for editing using the associated &quot;edit&quot; verb in the registry (or Notepad if no verb). However, if an editor window appears to have the script already open (based on its window title), that window is activated instead of opening a new instance of the editor.</p>
<p>This command  has no effect when operating from within a compiled script.</p>
<p>On a related note, AutoHotkey syntax highlighting can be enabled for various editors - see below. In addition, context sensitive help for AutoHotkey commands can be enabled in any editor via <a href="../scripts/ContextSensitiveHelp.htm">this example</a>. Finally, your productivity may be improved by using an auto-completion utility like  <a href="http://www.autohotkey.com/forum/topic12985.html">ISense</a>, which works in almost any editor. It watches what you type and displays menus and parameter lists, which does some of the typing for you and reminds you of the order of parameters.</p>

<h3>Related</h3>
<p><a href="Reload.htm">Reload</a></p>
<h3>Example</h3>
<pre class="NoIndent">Edit <em>; opens the script for editing.</em></pre>
<pre class="NoIndent"><em>; If your editor's command-line usage is something like the following,
; this script can be used to set it as the default editor for ahk files:
;
;   Editor.exe "Full path of script.ahk"
;
; When you run the script, it will prompt you to select the executable
; file of your editor.
;</em>
FileSelectFile Editor, 2,, Select your editor, Programs (*.exe)
if ErrorLevel
    ExitApp
RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, "%Editor%" "`%1"</pre>

<h3 id="Editors">Editors with AutoHotkey Support</h3>
<p>SciTE4AutoHotkey is a custom version of the text editor known as SciTE, tailored for editing AutoHotkey scripts. Its features include:</p>
<ul>
  <li>Syntax highlighting</li>
  <li>Smart auto-indent</li>
  <li>Auto-complete</li>
  <li>Calltips (also known as IntelliSense)</li>
  <li>Code folding</li>
  <li>Support for <a href="../Scripts.htm#idebug">interactive debugging</a></li>
  <li>Other tools for AutoHotkey scripting</li>
</ul>
<p>SciTE4AutoHotkey can be found here: <a href="http://fincs.ahk4.net/scite4ahk/">http://fincs.ahk4.net/scite4ahk/</a></p>
<p><b>Other editors</b> for which AutoHotkey syntax highlighting can be enabled:</p>
<ul>
  <li>AkelPad - <a href="http://www.autohotkey.com/forum/topic23586.html">http://www.autohotkey.com/forum/topic23586.html</a></li>
  <li>Crimson Editor - <a href="http://www.autohotkey.com/forum/topic5506.html">http://www.autohotkey.com/forum/topic5506.html</a></li>
  <li>Eclipse, FAR manager, and any other editors which use Colorer take5 - <a href="http://www.autohotkey.com/forum/topic10378.html">http://www.autohotkey.com/forum/topic10378.html</a></li>
  <li>Emacs - <a href="https://github.com/tinku99/ahk-org-mode">https://github.com/tinku99/ahk-org-mode</a></li>
  <li>Notepad++ - <a href="http://www.autohotkey.com/forum/topic58792.html">http://www.autohotkey.com/forum/topic58792.html</a></li>
  <li>Notepad2 - <a href="http://www.autohotkey.com/forum/viewtopic.php?t=37652">http://www.autohotkey.com/forum/viewtopic.php?t=37652</a></li>
  <li>PSPad - <a href="http://www.autohotkey.com/forum/topic9294.html">http://www.autohotkey.com/forum/topic9294.html</a></li>
  <li>SciTE and possibly other Scintilla based editors - <a href="http://www.autohotkey.com/forum/topic9656.html">http://www.autohotkey.com/forum/topic9656.html</a></li>
  <li>Sublime Text Editor - <a href="http://www.autohotkey.com/forum/viewtopic.php?p=368326#368326">http://www.autohotkey.com/forum/viewtopic.php?p=368326#368326</a></li>
  <li>Total Commander with Synplus plugin - <a href="http://www.autohotkey.com/forum/topic7278.html">http://www.autohotkey.com/forum/topic7278.html</a></li>
</ul>
<p>Additionally, the zip download of AutoHotkey Basic (<a href="http://www.autohotkey.com/download/">http://www.autohotkey.com/download/</a>) includes files for enabling syntax highlighting in the following editors. However, some of these files are badly out of date and may or may not work:</p>
<ul>
  <li>ConTEXT</li>
  <li>EditPlus</li>
  <li>EmEditor</li>
  <li>jEdit</li>
  <li>MED</li>
  <li>TextPad</li>
  <li>UltraEdit</li>
  <li>Vim</li>
</ul>
<p>If your favourite editor isn't listed here, try your luck by searching the <a href="http://ahkscript.org/boards/">forums</a>.</p>
<p>To get an editor added to this page, contact Lexikos <a href="http://ahkscript.org/boards/ucp.php?i=pm&mode=compose&u=77">via the forums</a> or <a href="https://github.com/Lexikos/AutoHotkey_L-Docs/">GitHub</a>.</p>

</body>
</html>
